#include "../base/kvcfg.h"
#include <assert.h>

static void _f( const char* k , const char* v, void* args ) {
	printf("%s = %s\n",k,v);
}


void test() {
	struct kv_element* e;
	struct kv_element* c;
	e = kv_element_load_script("test.cfg");
	assert(e);
	kv_element_print(stderr,e);
	kv_element_destroy(e);

	e = kv_element_load_script("master.cfg");
	assert(e);
	kv_element_print(stdout,e);

	c = kv_element_query(e,"add-thread");
	assert(c);
	printf("%s\n",kv_element_get_atomic_value(c));



}